<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:component>
        <h:form>
            <p:menubar style="margin: auto; margin-left: 0; width: 80%; font-size: small;" rendered="#{loginMediator.adminLogedIn}">
                <p:menuitem value="Pocetna" outcome="home.xhtml"/>
                <p:menuitem value="Predmeti" outcome="adminCoursePage.xhtml"/>
                <p:menuitem value="Korisnici" outcome="adminUserPage.xhtml"/>
                <p:menuitem value="Plan angazovanja" outcome="adminPlanPage.xhtml"/>
                <p:menuitem value="Raspored" outcome="adminStudentPlanPage.xhtml"/>
                <p:menuitem value="Obavestenja" outcome="adminInfoPage.xhtml"/>
                <f:facet name="options">   
                    <p:outputLabel value="#{loginMediator.currUserLabel}"/>
                    <p:button  value="Login" outcome="loginPage.xhtml"  rendered="#{!(loginMediator.adminLogedIn||loginMediator.profLogedIn||loginMediator.studentLogedIn)}"/>  
                    <p:commandButton  value="Logout" action="#{loginMediator.logOut()}"  rendered="#{(loginMediator.adminLogedIn||loginMediator.profLogedIn||loginMediator.studentLogedIn)}"/> 
                </f:facet>
            </p:menubar>
        </h:form>
    </ui:component>
</html>

